package com.gao.masterslave.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RedisPropertiesConfig {

    /** master redis*/
    @Value("${spring.redis.master.host}")
    private String mHost;

    @Value("${spring.redis.master.port}")
    private int mPort;

    @Value("${spring.redis.master.password}")
    private String mPassword;

    @Value("${spring.redis.master.database}")
    private int mDatabase;

    @Value("${spring.redis.master.timeout}")
    private Long mTimeout;


    /** slave redis*/
    @Value("${spring.redis.slave.host}")
    private String sHost;

    @Value("${spring.redis.slave.port}")
    private int sPort;

    @Value("${spring.redis.slave.password}")
    private String sPassword;

    @Value("${spring.redis.slave.database}")
    private int sDatabase;

    @Value("${spring.redis.slave.timeout}")
    private Long sTimeout;

    public String getmHost() {
        return mHost;
    }

    public void setmHost(String mHost) {
        this.mHost = mHost;
    }

    public int getmPort() {
        return mPort;
    }

    public void setmPort(int mPort) {
        this.mPort = mPort;
    }

    public String getmPassword() {
        return mPassword;
    }

    public void setmPassword(String mPassword) {
        this.mPassword = mPassword;
    }

    public int getmDatabase() {
        return mDatabase;
    }

    public void setmDatabase(int mDatabase) {
        this.mDatabase = mDatabase;
    }

    public Long getmTimeout() {
        return mTimeout;
    }

    public void setmTimeout(Long mTimeout) {
        this.mTimeout = mTimeout;
    }

    public String getsHost() {
        return sHost;
    }

    public void setsHost(String sHost) {
        this.sHost = sHost;
    }

    public int getsPort() {
        return sPort;
    }

    public void setsPort(int sPort) {
        this.sPort = sPort;
    }

    public String getsPassword() {
        return sPassword;
    }

    public void setsPassword(String sPassword) {
        this.sPassword = sPassword;
    }

    public int getsDatabase() {
        return sDatabase;
    }

    public void setsDatabase(int sDatabase) {
        this.sDatabase = sDatabase;
    }

    public Long getsTimeout() {
        return sTimeout;
    }

    public void setsTimeout(Long sTimeout) {
        this.sTimeout = sTimeout;
    }
}
